package com.jhs.boot.system.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 节点表单对象
 *
 * @author zxy
 * @since 2025-08-11 19:17
 */
@Getter
@Setter
@Schema(description = "节点表单对象")
public class SysNodesForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    private Long id;

    @Schema(description = "父类节点id")
    private Long parentId;

    @Schema(description = "IP地址")
    @NotBlank(message = "IP地址不能为空")
    @Size(max=50, message="IP地址长度不能超过50个字符")
    private String ip;

    @Schema(description = "mac地址")
    @Size(max=100, message="mac地址长度不能超过100个字符")
    private String mac;

    @Min(value = 0, message = "部门ID不能为空")
    @Schema(description="部门ID")
    private Long deptId;

    @Schema(description = "设备地址")
    @Size(max=50, message="设备地址长度不能超过50个字符")
    private String location;

    @Schema(description = "在线状态 1-在线 0-下线")
    private Integer status=0;

    @Schema(description = "ap的类型状态 0-map 1-mpp 3终端")
    @Min(value = 0, message = "类型不能为空")
    private Integer type;

    @Schema(description = "节点的X值")
    private Integer x;

    @Schema(description = "节点的Y值")
    private Integer y;

    @Schema(description = "逻辑删除标识(0-未删除 1-已删除)")
    private Integer isDeleted;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


    @Schema(description = "允许上线标识(0-允许 1-禁止)")
    private Integer promise;
}
